using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Add Terminal Configuration</para>
    /// <para>Adds a terminal configuration to an existing utility network.</para>
    /// <para>将终端配置添加到现有公共设施网络。</para>
    /// </summary>    
    [DisplayName("Add Terminal Configuration")]
    public class AddTerminalConfiguration : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddTerminalConfiguration()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The input utility network to which the terminal configuration will be added.</para>
        /// <para>将添加终端配置的输入公共设施网络。</para>
        /// </param>
        /// <param name="_terminal_configuration_name">
        /// <para>Name</para>
        /// <para>The name of the terminal configuration.</para>
        /// <para>终端配置的名称。</para>
        /// </param>
        /// <param name="_traversability_model">
        /// <para>Directionality</para>
        /// <para><xdoc>
        ///   <para>Specifies the directionality of the terminal configuration. A directional traversability model means the flow for the terminal will only go in one direction. A bidirectional traversability model means the terminal allows flow in both directions.</para>
        ///   <bulletList>
        ///     <bullet_item>Directional—Only one flow direction is permitted.</bullet_item><para/>
        ///     <bullet_item>Bidirectional—Both flow directions are permitted.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定终端配置的方向性。方向遍历性模型意味着终端的流量将只沿一个方向流动。双向可遍历性模型意味着终端允许双向流动。</para>
        ///   <bulletList>
        ///     <bullet_item>定向 （Directional） - 只允许一个流向。</bullet_item><para/>
        ///     <bullet_item>双向 - 允许两个流动方向。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AddTerminalConfiguration(object _in_utility_network, object _terminal_configuration_name, _traversability_model_value _traversability_model)
        {
            this._in_utility_network = _in_utility_network;
            this._terminal_configuration_name = _terminal_configuration_name;
            this._traversability_model = _traversability_model;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Add Terminal Configuration";

        public override string CallName => "un.AddTerminalConfiguration";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _terminal_configuration_name, _traversability_model.GetGPValue(), _terminals_directional, _terminals_bidirectional, _valid_paths, _default_path.GetGPValue(), _out_utility_network];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The input utility network to which the terminal configuration will be added.</para>
        /// <para>将添加终端配置的输入公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Name</para>
        /// <para>The name of the terminal configuration.</para>
        /// <para>终端配置的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _terminal_configuration_name { get; set; }


        /// <summary>
        /// <para>Directionality</para>
        /// <para><xdoc>
        ///   <para>Specifies the directionality of the terminal configuration. A directional traversability model means the flow for the terminal will only go in one direction. A bidirectional traversability model means the terminal allows flow in both directions.</para>
        ///   <bulletList>
        ///     <bullet_item>Directional—Only one flow direction is permitted.</bullet_item><para/>
        ///     <bullet_item>Bidirectional—Both flow directions are permitted.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定终端配置的方向性。方向遍历性模型意味着终端的流量将只沿一个方向流动。双向可遍历性模型意味着终端允许双向流动。</para>
        ///   <bulletList>
        ///     <bullet_item>定向 （Directional） - 只允许一个流向。</bullet_item><para/>
        ///     <bullet_item>双向 - 允许两个流动方向。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Directionality")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _traversability_model_value _traversability_model { get; set; }

        public enum _traversability_model_value
        {
            /// <summary>
            /// <para>Directional</para>
            /// <para>Directional—Only one flow direction is permitted.</para>
            /// <para>定向 （Directional） - 只允许一个流向。</para>
            /// </summary>
            [Description("Directional")]
            [GPEnumValue("DIRECTIONAL")]
            _DIRECTIONAL,

            /// <summary>
            /// <para>Bidirectional</para>
            /// <para>Bidirectional—Both flow directions are permitted.</para>
            /// <para>双向 - 允许两个流动方向。</para>
            /// </summary>
            [Description("Bidirectional")]
            [GPEnumValue("BIDIRECTIONAL")]
            _BIDIRECTIONAL,

        }

        /// <summary>
        /// <para>Terminals</para>
        /// <para><xdoc>
        ///   <para>The name and directional flow of each directional terminal. A minimum of two terminals must be specified, and a maximum of eight can be specified. The name of each terminal cannot exceed 32 characters. This parameter is required if the Directionality parameter value is Directional.</para>
        ///   <bulletList>
        ///     <bullet_item>Name—Provide the name of the terminal.</bullet_item><para/>
        ///     <bullet_item>Upstream—Indicate whether the terminal is upstream or downstream.
        ///     <bulletList>
        ///       <bullet_item>Checked—The terminal is upstream.  </bullet_item><para/>
        ///       <bullet_item>Unchecked—The terminal is downstream.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>每个定向终端的名称和定向流。必须至少指定两个端子，最多可以指定八个端子。每个终端的名称不能超过 32 个字符。如果 Directionality 参数值为 Directional，则此参数是必需的。</para>
        ///   <bulletList>
        ///     <bullet_item>名称 （Name） - 提供终端的名称。</bullet_item><para/>
        /// <bullet_item>上游 （Upstream） - 指示终端是上游还是下游。
        ///     <bulletList>
        ///       <bullet_item>选中 - 终端位于上游。</bullet_item><para/>
        ///       <bullet_item>未选中 - 终端位于下游。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Terminals")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _terminals_directional { get; set; } = null;


        /// <summary>
        /// <para>Terminals</para>
        /// <para>The name of each bidirectional terminal. A minimum of two terminals must be specified, and a maximum of eight can be specified. The name of each terminal cannot exceed 32 characters. This parameter is required if the Directionality parameter value is Bidirectional (traversability_model = "BIDIRECTIONAL" in Python).</para>
        /// <para>每个双向终端的名称。必须至少指定两个端子，最多可以指定八个端子。每个终端的名称不能超过 32 个字符。如果 Directionality 参数值为 Bidirectional（Python 中traversability_model = “BIDIRECTIONAL”），则此参数是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Terminals")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _terminals_bidirectional { get; set; } = null;


        /// <summary>
        /// <para>Valid Path(s)</para>
        /// <para><xdoc>
        ///   <para>The name or names and valid path or paths for the terminal configuration. For bidirectional traversability, this parameter is required if you have three or more terminals. If you are using directional traversability, one of the terminals must be upstream to have valid configurations. Valid paths must be created to indicate which path or paths in a device or junction object are valid for a resource to travel through. Provide a name for each valid path as well as a value.</para>
        ///   <bulletList>
        ///     <bullet_item>Name—The name of the valid path.</bullet_item><para/>
        ///     <bullet_item>Value—The value of the valid path.
        ///     <bulletList>
        ///       <bullet_item>All—Enter a value of All to create an option that indicates all paths are valid.  </bullet_item><para/>
        ///       <bullet_item>None—Enter a value of None to create an option that indicates that no paths are valid.  </bullet_item><para/>
        ///       <bullet_item>Terminal pair(s)—Enter a single or collection of terminal pairs. Enter a single terminal pair by specifying the path from one terminal to another separated by a hyphen, for example, A-B. Enter a collection of terminal pairs separated by a comma, for example, A-B, A-C.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>终端配置的名称和有效路径。对于双向遍历性，如果有三个或更多终端，则此参数是必需的。如果使用方向遍历性，则其中一个终端必须位于上游才能具有有效的配置。必须创建有效路径，以指示设备或联结对象中的哪条或哪条路径对资源要通过的路径有效。为每个有效路径提供名称和值。</para>
        ///   <bulletList>
        ///     <bullet_item>名称 - 有效路径的名称。</bullet_item><para/>
        /// <bullet_item>值 - 有效路径的值。
        ///     <bulletList>
        ///       <bullet_item>全部 - 输入值“全部”以创建一个指示所有路径均有效的选项。</bullet_item><para/>
        ///       <bullet_item>None - 输入值 None 以创建一个选项，指示没有路径有效。</bullet_item><para/>
        ///       <bullet_item>端子对 （s） - 输入单个端子对或终端对的集合。通过指定从一个终端到另一个终端的路径（例如 A-B）来输入单个终端对。输入用逗号分隔的终端对的集合，例如 A-B、A-C。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Valid Path(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _valid_paths { get; set; } = null;


        /// <summary>
        /// <para>Default Path</para>
        /// <para><xdoc>
        ///   <para>The default path of the valid configurations. This will be assigned to new features that have this terminal configuration assigned to their asset type. If no valid paths have been specified, the default path All will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>All—All paths are valid. This is the default.</bullet_item><para/>
        ///     <bullet_item>None—No paths are valid.</bullet_item><para/>
        ///     <bullet_item>Valid path—A valid path specified in the Valid Path(s) parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>有效配置的默认路径。这将分配给将此终端配置分配给其资产类型的新功能。如果未指定有效路径，则将使用默认路径 All。</para>
        ///   <bulletList>
        ///     <bullet_item>全部 - 所有路径均有效。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>无 - 没有路径有效。</bullet_item><para/>
        ///     <bullet_item>有效路径 - 在有效路径参数中指定的有效路径。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Default Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _default_path_value? _default_path { get; set; } = null;

        public enum _default_path_value
        {
            /// <summary>
            /// <para>All</para>
            /// <para>All—All paths are valid. This is the default.</para>
            /// <para>全部 - 所有路径均有效。这是默认设置。</para>
            /// </summary>
            [Description("All")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>None</para>
            /// <para>None—No paths are valid.</para>
            /// <para>无 - 没有路径有效。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

        }

        /// <summary>
        /// <para>Updated Utility Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        public AddTerminalConfiguration SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}